﻿using FySystem.Data.OrmA.Formatter;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Text;

namespace FySystem.Data.OrmA
{
    class DbConfigs
    {
        /// <summary>
        /// SQL生成器
        /// </summary>
        internal ISqlFormatter SQLFormatter { get; set; }

        /// <summary>
        /// 数据库连接字符串
        /// </summary>
        internal string ConnStr { get; set; }

        /// <summary>
        /// 数据库工厂
        /// </summary>
        internal DbProviderFactory DbProviderFactory { get; set; }

        /// <summary>
        /// 创建数据库配置
        /// </summary>
        /// <param name="sqlFormatter"></param>
        /// <param name="providerFactory"></param>
        /// <param name="connStr"></param>
        internal DbConfigs(ISqlFormatter sqlFormatter, DbProviderFactory providerFactory,string connStr)
        {
            SQLFormatter = sqlFormatter;
            DbProviderFactory = providerFactory;
            ConnStr = connStr;
        }
    }
}
